home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 4 / FM Towns Free Software Collection 4 - Disc 1.iso / msdos / css / demo1.c < prev    next >
C/C++ Source or Header  |  1991-10-18  |  626b  |  26 lines

  1. #include "csscom.h"
  2. double U,U1,Y,Y2,X;
  3. _titleS[0]=0;gopen(0);GDS_setcompat(1);tpalet();
  4. LTIME=50;DT=.1;_xamt=1./LTIME;
  5. sprintf(_grapS[0],"U1/5");
  6. sprintf(_grapS[1],"Y/10");
  7. sprintf(_grapS[2],"Y2/10");
  8. sprintf(_grapS[3],"X/10");
  9. Y=0;
  10. _gtyp=0;_inigrap(_gtyp,_titleS,LTIME,_grapS,4);
  11. for(TIME=0;TIME<=LTIME;TIME+=DT){
  12. _zn=0;
  13. /* REM **** NMODEL2 ****/;
  14. U=STEP(0);
  15. U1=U*10;
  16. X=U1-Y;
  17. Y2=HSTRLY(0,0,4,-5,5,X);
  18. Y=REALPL(0,10,Y2);
  19. Y=40*Y;
  20. _gpset(_gtyp, U1/5, 0);
  21. _gpset(_gtyp, Y/10, 1);
  22. _gpset(_gtyp, Y2/10, 2);
  23. _gpset(_gtyp, X/10, 3);
  24. }
  25. locate(78,22,CON);while(ESC!=getch());rpalet();gclose();putchar('\n');}
  26.